{yun:}include file="$wapstyle/member/cheader.htm"{/yun}
<section class="wap_member">
    <div class="mui-collapse-content">
		<form action="index.php?c=childeditsave" method="post" id="editchildForm" onsubmit="return check_editchildmsg(this);">
			<ul class="yunset_password mt15">
				<li><span class="yunset_password_mname">用户名</span>
					<div class="mui-input-row">
						<input type="text" id="usernameId" name="username" value="{yun:}$info.username{/yun}" {yun:}if !empty($info){/yun}disabled{yun:}/if{/yun} autocomplete="off" placeholder="请输入用户名" >
					</div>
				</li>
				<li><span class="yunset_password_mname">密码</span>
					<div class="mui-input-row">
                    <div class="password_pd">
						<input type="password" class="mui-input-password" value="" name="password" id="pwdId" placeholder="请输入密码" autocomplete="off">
					</div>	</div>
				</li>
				<li><span class="yunset_password_mname">部门</span>
					<div class="mui-input-row">
						<input type="text" id="nameId" name="name" value="{yun:}$info.name{/yun}" placeholder="请输入部门" autocomplete="off">
					</div>
				</li>
				{yun:}if !empty($info){/yun}
					<div style="text-align:center;margin-top:10px;"><font color="#f00;">不修改密码请留空!</font></div>
				{yun:}/if{/yun}
				<div class="yunset_bth_box">
					<input type="hidden" name="cuid" id="childValId" value = "{yun:}if !empty($info){/yun}{yun:}$info.uid{/yun}{yun:}else{/yun}0{yun:}/if{/yun}">
					<button class="mui-btn mui-btn-primary" name ="submit" type="submit">确认</button>&nbsp;&nbsp;
				</div>
			</ul>
		</form>
	</div>
</section>
<script>

	//名称获取焦点
	$('#usernameId').on('focus', function(){
		if($(this).val() == '请输入用户名'){
			$(this).val('');
		}
	});

	//提交判断
	function check_editchildmsg(target_form) {

		var usernameStr = $.trim($("#usernameId").val());
		if (usernameStr == "" || usernameStr == "请输入用户名") {
			layermsg('用户名不能为空！');
			return false;
		}
		if ($('#childValId').val() == 0) {
			if ($.trim($("#pwdId").val()) == "") {
				layermsg('密码不能为空！', 2);
				return false;
			}
		}
		if ($.trim($("#nameId").val()) == "") {
			layermsg('部门不能为空！', 2);
			return false;
		}
		post2ajax(target_form);
		return false;
	}

</script>
{yun:}include file="$wapstyle/footer.htm"{/yun}